#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import json
# d = ['wangkaixuan','chengangrong','longhao']
# data = json.dumps(d)
# print(data)
# print(json.loads(data))

class Student(object):
    """docstring for Student."""
    def __init__(self, name,age,score):
        self.name = name
        self.age = age
        self.score = score
    def __str__(self):
        return 'Student object(%s,%s,%s)' % (self.name,self.age,self.score)

s = Student('Bob',20,99)
std_data = json.dumps(s,default = lambda obj:obj.__dict__)
print('Dump Student:',std_data)
